import programs

ans = 999
while ans > 0:
    print "[1] Add users"
    print "[2] Show account information"
    print "[3] Auto-buy contracts"
    print "[4] Relist contracts"
    print "[5] Transfer coins to main account"
    print "[0] Exit"
    ans = raw_input("Select option: ")
    try:
        ans = int(ans)
    except ValueError:
        ans = 999
    if ans == 1:
        programs.Users()
    if ans == 2:
        programs.accountInformation()
    if ans == 3:
        hours = raw_input("How many hours to run: ")
        programs.autoContracts(hours=hours)
    if ans == 4:
        programs.relistContracts(hours=1)
    if ans == 5:
        programs.transferMoney()
